package org.rambadger.command.resource;

import com.google.common.collect.Lists;
import org.rambadger.command.view.rss.*;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

//import static org.rambadger.command.view.RSSView.RSSItem;

@Path("/feedtest")
public class TestRSSResource {
    @GET
    @Produces({"application/xml", "application/rss+xml"})
    public Object getTestFeed() {
        System.out.println("hello");
        return new RSSView("test", "http://localhost/foo", "Hello, World!", Lists.newArrayList(
                new RSSItem("hello 1", "http://localhost/hello1", "Hello, World 1!"),
                new RSSItem("hello 2", "http://localhost/hello2", "Hello, World 2!"),
                new RSSItem("hello 3", "http://localhost/hello3", "Hello, World 3!"),
                new RSSItem("hello 4", "http://localhost/hello4", "Hello, World 4!"),
                new RSSItem("hello 5", "http://localhost/hello5", "Hello, World 5!")
        ));
    }
}
